lm-sensors: fix build with glibc
authorJohn Audia <[email protected]>
Sat, 16 Aug 2025 10:44:45 +0000 (06:44 -0400)
committerRobert Marko <[email protected]>
Mon, 25 Aug 2025 15:29:59 +0000 (17:29 +0200)
commit763f984e4f0bb1409c9f40b8518a8eabf963abb9
tree6111961c7b0cb54ddc5c2c52811befa09dac8aa0
parentd3b228612831758f4de889749df956c315c18380
lm-sensors: fix build with glibc

The lm-sensors build was failing on glibc-based targets with:
  ld: cannot find -liconv: No such file or directory

which occurred because the upstream Makefile unconditionally links
against -liconv, but glibc has iconv functionality built-in and does not
provide a separate libiconv library.

I submitted the new patch upstream to fix this:
https://github.com/hramrach/lm-sensors/pull/14

This change is backward compatible based on my testing building
lm-sensors for x86/64 with glibc and again with musl after having
applied the patch.

Build system: x86/64
Build-tested: x86/64-glibc and x86/64
Run-tested: x86/64-glibc (Intel N150 based box)

Signed-off-by: John Audia <[email protected]>
utils/lm-sensors/Makefile
utils/lm-sensors/patches/100-Fix-iconv-linking-detection-for-glibc-based-builds.patch [new file with mode: 0644]